package com.lizhi.rpc.controller;

import com.lizhi.rpc.handler.RecvJlcPatientInfoHandler;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author: lizhi
 * @Description:
 * @Date: create in 2020/11/2 11:07
 */
@Slf4j
@RestController
@RequestMapping(value = "/api/rpc/jlc/patientInfo")
@Api("经颅磁患者信息")
public class RecvJlcPatientInfoController {

    @Resource
    private RecvJlcPatientInfoHandler recvJlcPatientInfoHandler;


    @ApiOperation("接收同步的患者信息")
    @ApiImplicitParam(name = "json", value = "患者数据", required = true, dataType = "String", paramType = "query")
    @PostMapping(path = "/recvPatient")
    public String recvPatient(@RequestBody String json){
        return recvJlcPatientInfoHandler.recvJlcPatientInfo(json);
    }
}
